//
//  QNKeyConstans.h
//  QNEngine
//
//  Created by QNRZMac on 15/5/21.
//  Copyright (c) 2015年 Sunline. All rights reserved.
//

#import <Foundation/Foundation.h>

/*********************************Notification*****************************************///系统通知
#define kQNNotifySquareQuestionNotification              @"com.sunline.kQNNotifySquareQuestionNotification"
#define kQNNotifyFinancialAmountNotification              @"com.sunline.kQNNotifyFinancialAmountNotification"
#define kQNNotifyUniversalNotification  @"com.sunline.kQNNotifyUniversalNotification"
#define kQNNotifyDidReciveRemoteNotify                   @"com.sunline.kNotifyDidReciveRemoteNotify"

//交易 调仓 添加新的股票
#define kTradeAdjustAddStockNotification                 @"com.sunline.kNotifyTradeAddStockNotify"
#define kQNTradeDidWithdrawOrderNotification             @"com.sunline.kNotifyTradeDidWithdrawOrder"
#define kQNDeviceShakeNotification                       @"com.sunline.DeviceShakeNotification"

//服务器返回了一些通用错误可发送此通知，比如会话失效。游客权限不足等。
#define kQNCommonErrorFromServerNotify                        @"com.sunline.kQNCommonErrorFromServerNotify"
#define kWeixinAccessTokenResponseNotify                 @"com.sunline.kNotifyWeixinAccessTokenResponse"
#define kQqAccessTokenResponseNotify                     @"com.sunline.kNotifyQqAccessTokenResponse"
#define kWeiboAccessTokenResponseNotify                  @"com.sunline.kNotifyWeiboAccessTokenResponse"

/**
 * 系统更新通知,以下两种条件会触发
 * 1)手动调用检测升级接口
 * 2)任何网络请求接口做请求时都有可能返回需要升级信息
 * 目前只处理两种情况,强制更新和建议更新.
 * 1)强制升级 (code 1004)
 * 2)建议更新 (code 为0,checkCode为2)
 */
#define kSLApplicationGetUpdateInfoNotify                @"com.sunline.kApplicationGetUpdateInfoNotify"

#define kQNNetErrShowHUDRequestNotify                    @"com.sunline.kNotifyNetErrShowHUDRequest"
#define kQNShoppingCartAddMoreStockRequestNotify         @"com.sunline.kNotifyAddMoreStockRequest"
//Ptf
#define kQNPtfReloadCellNotification                     @"com.sunline.QNPTFDetailCellNeedReloadNotification"
#define kQNPTFDidChangeProfitNotify                      @"com.sunline.kNotifyPTFDidCreatNewProfitNotify"
#define kQNFriendDidAddFriendNotify                      @"com.sunline.kNotifyFriendDidAddFriendNotify"
#define kReadAddressBookInfoBeginNotify                  @"com.sunline.kNotifyReadAddressBookInfoBegin"
#define kReadAddressBookInfoEndNotify                    @"com.sunline.kNotifyReadAddressBookInfoEnd"
#define kQNPortfolioChartTappedNotify                    @"com.sunline.kNotifyPortfolioChartTapped"
#define kQNPtfFavDidChangedNotification                  @"com.sunline.kNotifyPtfFavDidChanged"
//StockCart
#define kQNStockCartWillDismissNotify                    @"com.sunline.kNotifyStockCartWillDismiss"
#define kQNStockCartWillShowNotify                       @"com.sunline.kNotifyStockCartWillShow"
#define kQNStockCartDidRecivePreCreateStksNotify         @"com.sunline.kNotifyStockCartDidRecivePreCreateStks"
#define kQNStockCartDidDeletedStockNotify                @"com.sunline.kNotifyStockCartDidDeletedStock"
//Chart
#define kQNCahrtViewDidReceiveTrailDataNotify            @"com.sunline.kNotifyCahrtViewDidReceiveTrailData"
#define kQNChartViewLoadDataFailedNotify                 @"com.sunline.kNotifyChartViewLoadDataFailed"
//User
#define kQNUserDataDidChangeNotification                 @"com.sunline.kNotifyUserDidChangeNotify"
#define kQNUserInterestedConceptsNotification            @"com.sunline.kNotifyInterestedConcepts"
#define kQNUserFriendsChangeNotification                 @"com.sunline.kNotifyFriendsChange"
#define kQNUserAvatorUrlStringChangeNotification         @"com.sunline.kNotifyUserAvatorUrlStringChange"
#define kQNUserNicknameChangeNotification                @"com.sunline.kNotifyUserNicknameChange"
#define kSLUserTradeAccountChangeNotification                @"com.sunline.kSLUserTradeAccountChangeNotification"
//投顾关系
#define kSLAdviserRelationDidChangeNotification          @"com.sunline.kSLAdviserListDidChangeNotification"
//修改备注名
#define kQNUserCommentNameNotification                   @"com.sunline.kUserCommentNameNotification"
//需要个人主页刷新的通知
#define kQNUserFriendDetailNeedRefreshNotification       @"com.sunline.kUserFriendDetailNeedRefreshNotification"
#define kQNUserSignatureChangeNotification               @"com.sunline.kNotifyUserSignatureChange"
#define kQNUserPhoneNumberChangeNotification             @"com.sunline.kNotifyPhoneNumberChange"
#define kSLUserTypeChangeNotification                    @"com.sunline.kNotifyUserTypeChange"
#define kQNUserGenderChangeNotification                  @"com.sunline.kNotifyGenderChange"
#define kQNUsetSearchTextsChangeNotification             @"com.sunline.kNotifySearchTextsChange"
#define kQNUserDidDeleteFriendNotification               @"com.sunline.kNotifyDidDeleteFriend"
#define kQNUserDidFinishEditUserInfoNotification         @"com.sunline.kNotifyDidFinishEditUserInfo"
#define kGZUserEmailChangeNotification                   @"com.sunline.kNotifyEmailChange"

//Share
//#define kQNUserShareDidEndNotification                   @"com.sunline.kNotifyShareDidEnd"

#define kQNSendNoteSuccessNotification                   @"com.sunline.kQNSendNoteSuccess"  /**< 发送投资圈成功 */
#define kQNSendNoteFailureNotification                   @"com.sunline.kQNSendNoteFailure"  /**< 发送投资圈失败 */
#define kQNSendNoteStartNotification                     @"com.sunline.kQNSendNoteStart"    /**< 开始发送投资圈 */
#define kQNSendNoteDeleteNotification                    @"com.sunline.kQNSendNoteDelete"   /**< 删除未发送成功的投资圈 */

#define kQNNoteDeleteNotification                        @"com.sunline.kQNNoteDeleteNotification"   /**< 删除已发送成功的投资圈 object为帖子id */
#define kQNNoteCommentOrLideChangeNotification            @"com.sunline.kQNNoteCommentOrLideChangeNotification" /**< 投资圈评论赞的信息改变 object为note */

#define kSLAdviserApplySubmitSuccessNotification         @"com.sunline.kSLAdviserApplySubmitSuccessNotification"

//通讯录上传完毕
#define kQNUserUploadContactsEndNotification             @"com.sunline.kNotifyUserUploadContactsEnd"
/**< 更新会话列表的通知*/
#define kUpdateConversationListNotification              @"com.sunline.kUpdateConversationListNotification"
/**< IM收到要显示的cmd消息(从object带过来) */
#define kDidReceiveNeedDisplayCmdMessageNotification     @"com.sunline.kDidReceiveNeedDisplayCmdMessageNotification"
/**< IM图片发送进度通知 */
#define kMessageProgressChangeNotification               @"com.sunline.kMessageProgressChangeNotification"
/**< 群列表更新成功通知 */
#define kGroupListFetchNotification                      @"com.sunline.kGroupListFetchNotification"
/**
 *  验证码获取时间更新通知
 */
#define kCaptchaTimerChangedNotify                       @"com.sunline.kCaptchaTimerChanged"
/**
 *  发送验证码计时器完成计时
 */
#define kCaptchaTimerDidEndNotify                        @"com.sunline.kCaptchaTimerDidEnd"
/**
 *  验证码获取时间更新通知
 */
#define kCaptchaTimerChangedNotify30                       @"com.sunline.kCaptchaTimerChanged30"
/**
 *  发送验证码计时器完成计时
 */
#define kCaptchaTimerDidEndNotify30                        @"com.sunline.kCaptchaTimerDidEnd30"
/**
 *  投资圈输入框需要消失通知
 */
#define kCircleNeededDismissKeyBoardNotify               @"com.sunline.kCircleNeededDismissKeyBoard"
/**
 *  券商交易页面需要更新通知
 */
#define kTradeCenterNeedUpdateNotify                     @"com.sunline.kTradeCenterNeedUpdate"
/**
 *  用户自选股数据库增删通知
 */
#define kUserOptionalStockChangeNotify                   @"com.sunline.kUserOptionalStockChange"
/**
 *  用户自选股数据库删除通知
 */
#define kUserOptionalStockDeleteNotify                   @"com.sunline.kUserOptionalStockDelete"
/**
 *  用户自选股数据库增删通知
 */
#define kUserOptionalStockUpdateNotify                   @"com.sunline.kUserOptionalStockUpdate"

/**
*  用户L2行情变更通知
*/
#define KQuoteLevelNotification   @"quoteLevelNotification"
/**
 *  投顾观点评论成功通知
 */
#define kkAdviserViewpointCommentSuccessNotify           @"com.yiqiiniu.kAdviserViewpointCommentSuccess"
/**
 *  支付响应通知
 */
#define kPayResponseNotify                               @"com.sunline.kPayResponse"
/**
 *  弹屏广告链接更新通知
 */
#define kPopAdUrlUpdateNotify                            @"com.sunline.kPopAdUrlUpdate"

//群聊收到公告改变的通知 //内部包含groupId为object
#define kGroupAnnouncementDidChangeNotification          @"com.sunline.kGroupAnnouncementDidChange"

/**
 * 用户好友排序内容改变通知
 */
#define kQNUserFriendsSortedDictionaryChangedNotify      @"com.sunline.kUserFriendsSortedDictionaryChangedNotify"
#define kQNUserNewFriendsChangeNotification              @"com.sunline.kUserNewFriendsChangeNotify"
#define kQNUserRecomendFriendsChangeNotification         @"com.sunline.kUserRecomendFriendsChangeNotify"

#define kQNUserSystemUnreadMessageNotification           @"com.sunline.kUserSystemUnreadMessageNotification"
#define kSLDepositMessageNotification           @"com.sunline.kSLDepositMessageNotification"

//组合设置中心 添加股票
#define kSLPortfolioSettingCenterAddStockNotify          @"com.sunline.kNotifyPortfolioSettingCenterAddStock"


/*******************************NSDictionary Key***************************************/

#pragma mark - NSDictionary Key
/*
 * 网络请求返回code
 */
#define kHttpResponseCode        @"com.sunline.kHttpResponseCode"
/**
 * 网络请求返回信息
 */
#define kHttpResponseMessage     @"com.sunline.kHttpResponseMessage"
/**
 * 网络请求返回result
 */
#define kHttpResponseResult      @"com.sunline.kHttpResponseResult"
/**
 * 网络请求接口返回的升级信息
 * 所有接口都有可能返回此信息
 */
#define kHttpResponseUpdateInfo  @"com.sunline.kHttpResponseUpdateInfo"
/*
 *  关于用户Id的通知UserIdKey
 */
#define kQNUserIdKey               @"com.sunline.kUserId"
/*
 *  用户备注名Key
 */
#define kQNCommentNameKey          @"com.sunline.kCommentName"
/**
 * 网络请求接口名key(未读消息接口)
 */
#define kQNInterfaceUnReadMsgKey   @"get_unread_message"
/**
 * 网络请求接口名key(系统消息接口)
 */
#define kQNInterfaceSysMsgKey      @"fetch_system_message"
/**
 * 网络请求接口名key(股票列表更新接口)
 */
#define kQNInterfaceStkListKey     @"update_stock_list"
/**
 * 网络请求接口名key(概念列表更新接口)
 */
#define kQNInterfaceCctListKey     @"update_cct_list"
/**
 * 网络请求接口名key(获取好友接口)
 */
#define kQNInterfaceFetchFriendKey     @"fetch_friends"
/**
 * 网络请求接口名key(获取新的好友接口)
 */
#define kQNInterfaceFetchNewFriendKey  @"fetch_new_friends"
/**
 * 网络请求接口名key(获取系统配置接口)
 */
#define kQNInterfaceDefaultConfigKey   @"get_default_config"
/**
 * 获取群列表
 */
#define kQNInterfaceImGroupList   @"fetch_imgroup_list"

/**
 * 调仓消息
 */
#define kQNMessageForRebalance  @"get_unread_message_for_rebalance"
/**
 * 评论消息
 */
#define kQNMessageForComment  @"get_unread_message_for_comment"
/**
 * 点赞消息
 */
#define kQNMessageForLike  @"get_unread_message_for_like"
/**
 * 关注消息
 */
#define kQNMessageForFav  @"get_unread_message_for_fav"
/**
 * 投顾服务消息
 */
#define kQNMessageForAdviserService  @"get_unread_message_for_service"
/**
 * 股价提醒消息
 */
#define kGZMessageForStockReminder  @"get_unread_message_for_stk_price_reminder"
/**
 * 群助手消息
 */
#define kQNMessageForAssistant  @"get_unread_message_for_assistant"
//
#define kQNMessageForPushstock  @"get_unread_message_for_single_push"//获取个股推送未读数
#define kQNMessageForNewstock  @"get_unread_message_for_ipo_stk_reminder"//获取新股推送未读数
#define kQNMessageForStockTransaction  @"get_unread_message_for_trade_reminder"//获取交易推送唯独数
#define kQNMessageForSubscribe  @"get_unread_message_for_ipo_genius"//获取订阅消息未读数

/**
 * 小白广场问答消息
 */
#define kQNMessageForNoobSquareQA  @"get_unread_square_questioner"
/**
 * 小白专属投顾问答消息
 */
#define kQNMessageForNoobExclusiveQA  @"get_unread_exclusive_questioner"
/**
 * 小白专属投顾的观点消息
 */
#define kQNMessageForNoobExclusiveViewPoint  @"get_unread_new_viewpoint"
/**
 * 投顾的广场问答消息
 */
#define kQNMessageForAdviserSquareQA  @"get_unread_square_answer"
/**
 * 投顾的客户问答消息
 */
#define kQNMessageForAdviserCustomerQA  @"get_unread_exclusive_answer"
/**
 * 投资圈消息
 */
#define kQNMessageForInvestCircle  @"get_unread_message_for_invest"
/**
 *  市场主页缓存key
 */
#define kQNMarketIndexCacheKey    @"market_index_cache"
/**
 *  广告链接
 */
#define kQNFindPopADLinkKey  @"get_ad_push"
/**
 *  自选组合选中过滤类型
 */
#define kQNOptionalPortfolioFilterTypeKey  @"optionalPortfolioFilterType"
/**
 *  自选选中过滤类型
 */
#define kGZOptionalStockFilterTypeKey  @"optionalStockFilterType"
/**
 *  未读的而且未使用的卡券
 */
#define kQNMessageForUnreadCoupon  @"get_unread_coupon_message"
/**
 *  是否显示自选组合列表棒棒糖提示
 */
#define kQNOptionalPortfolioShowLolipopKey  @"optionalPortfolioShowLolipop"
#define kSLFindStartupADLinkKey  @"get_ad_startup"
#define kSLCleanWebviewCacheKey  @"clean_browser_cache"
/*******************************NSUserDefaults Key*************************************/

#pragma mark - NSUserDefaults Key

/**
 * 不再提醒升级
 */
#define kUserDefaultsDonotShowSuggestUpdateMessageAgain @"com.sunline.kUserDefaultsDonotShowSuggestUpdateMessageAgain"
/**
 * 上一次升级检测时间
 */
#define kUserDefaultsCheckUpdateLastTime  @"com.sunline.kUserDefaultsCheckUpdateLastTime"
/**
 * 上传的系统推送配置是否打开信息
 */
#define kUserDefaultsUploadPushConfigInfo  @"com.sunline.kUserDefaultsUploadPushConfigInfo"
/**
 *  是否显示新手上路引导
 */
#warning 每次升级需要显示引导页，必须更新Key
#define kNeededShowGuidanceKey  @"com.sunline.kNeededShowGuidance.V5"
/**
 *  是否显示市场蒙层引导
 */
#define kNeededShowMarketCoverGuidanceKey  @"com.sunline.kNeededShowCoverGuidance.V4"
/**
 *  是否显示IM蒙层引导
 */
#define kNeededShowIMCoverGuidanceKey  @"com.sunline.kNeededShowIMCoverGuidance.V3"
#define kNeededShowNewGuidanceKey  @"com.sunline.kNeededShowNewGuidance.V2" //更新key待定
/**
 *  通讯录上传失败
 */
#define kQUserDefaultsContactsUploadFailed          @"com.sunline.kUserDefaultContactsUploadFailed"
/**
 * 是否接收到登陆或注册接口返回的引导标识
 */
#define kQNUserGuideReciveNetworkResult             @"com.sunline.UserGuideReciveNetworkResult"
/**
 * 本地上传过的APP版本号信息
 */
#define kQNUploadAppVersion  @"com.sunline.kQNUploadAppVersion"
/**
 * 上一次启动应用的版本号
 */
#define kQNOldAppVersion  @"com.sunline.kQNOldAppVersion"
#define kQNFirstUploadContactsSuccessKey  @"com.sunline.kFirstUploadContactsSuccessKey"
/**
 * 组合默认起始模拟资金
 */
#define kQNPtfInitAmount  @"com.sunline.kQNPtfInitAmount"
/**
 * 单个组合最大股数
 */
#define kQNPtfMaxStks  @"com.sunline.kQNPtfMaxStks"
/**
 *  重设配置的版本号
 */
#define kQNResetDefaultConfigVersion  @"com.sunline.kQNResetDefaultConfigVersion"
#define kSLResetCacheConfigVersion  @"com.sunline.kSLResetCacheConfigVersion"
/**
 * 默认配置的版本号
 */
#define kQNdefaultConfigVersion  @"com.sunline.kQNdefaultConfigVersion"
#define kSLCacheConfigVersion  @"com.sunline.kSLCacheConfigVersion"
/**
 *  问答评价不满意标签
 */
#define kSLQuestionUnsatisfyType  @"com.sunline.kSLQuestionUnsatisfyType"
/**
 *  投顾认证工作年限
 */
#define kSLAdviserJobHour  @"com.sunline.kSLAdviserJobHour"
/**
 *  投顾问答股票模版
 */
#define kQNStockQuestionTemplate  @"com.sunline.kQNStockQuestionTemplate"
/**
 *  投顾问答未持仓的股票模版
 */
#define kQNNoHoldStockQuestionTemplate  @"com.sunline.kQNNoHoldStockQuestionTemplate"
/**
 *  投顾问答大盘模版
 */
#define kQNMarketQuestionTemplate  @"com.sunline.kQNMarketQuestionTemplate"
/**
 *  投顾问答其他模版
 */
#define kQNOtherQuestionTemplate  @"com.sunline.kQNOtherQuestionTemplate"
/**
 *  问答标为无效问题选项
 */
#define kQNReportContentOption  @"com.sunline.kQNReportContentOption"
/**
 *  理财首页URL
 */
#define kQNFinancialHomePageUrlKey  @"com.sunline.kQNFinancialHomePageUrl"
/**
 *  更多卡券跳转URL
 */
#define kQNForMoreCouponsUrlKey  @"com.sunline.kQNForMoreCouponsUrl"
/**
 *  债权项目URL
 */
#define kQNCreditorRightsProjectUrlKey  @"com.sunline.kQNCreditorRightsProjectUrl"


#pragma mark - User Switch
/**
 *  是否允许将我引荐给别人
 */
#define kSLUserSwitchDisableRecommend  @"com.sunline.kSLUserSwitchDisableRecommend"
/**
 *  是否允许通过手机号搜索到我
 */
#define kSLUserSwitchDisableSearchViaPhoneNum  @"com.sunline.kSLUserSwitchDisableSearchViaPhoneNum"
/**
 *  是否允许资讯推送
 */
#define kSLUserSwitchDisableNewsPush  @"com.sunline.kSLUserSwitchDisableNewsPush"
/**
 *  加我好友是否需要验证
 */
#define kSLUserSwitchDisableRequestVerification  @"com.sunline.kSLUserSwitchDisableRequestVerification"
/**
 *  允许自选股智能排序
 */
#define kSLUserSwitchOptionalStockIntelligentSorting  @"com.sunline.kSLUserSwitchOptionalStockIntelligentSorting"
/**
 *  允许交易提醒
 */
#define kSLUserSwitchTradePushNotice  @"com.sunline.kSLUserSwitchTradePushNotice"

/**
 *  分享记录对象
 */
#define kQNNoteRecordInfoObjectKey  @"QNNoteRecordInfoObject"
/**
 *  分享记录位置
 */
#define kQNNoteRecordInfoRangeLocationKey  @"QNNoteRecordInfoRangeLocation"
/**
 *  分享记录长度
 */
#define kQNNoteRecordInfoRangeLengthKey  @"QNNoteRecordInfoRangeLengthKey"


#define KGZQuoteColorChangeNotification  @"GZQuoteColorChangeNotification"

#define KGZNavigationTitleSwitchChangeNotification  @"NavigationTitleSwitchDidChange"


#define KGZQuoteMainNavStartRefreshNotification  @"GZQuoteMainNavStartRefresh"

#define KGZQuoteMainNavStopRefreshNotification  @"GZQuoteMainNavStopRefresh"


//切换到交易页面
#define kJFTradeMainViewShowNotification  @"kJFTradeMainViewShowNotification_AlanWang"
//切换到资讯的页面
#define kJFInfoMainViewShowNotification  @"kJFInfoMainViewShowNotification_AlanWang"



